<?php
session_start();
error_reporting(0);
if($_SESSION['username']!="")
{
?>
<!DOCTYPE html>
<html lang="en">
  <head>
     <? include "./include/head.php"; ?>
	  <? include "./include/js.php"; ?>
  </head>
  <body>
  <? include "./include/body.php"; ?>
	<?php
$id_pemesanan = $_POST["id_pemesanan"];
$tanggal = $_POST["tanggal"];
$nama_pemesan = $_POST["nama_pemesan"];
$alamat= $_POST["alamat"];
$propinsi = $_POST["propinsi"];
$kota = $_POST["kota"];
$email = $_POST["email"];
$telepon= $_POST["telepon"];
$status = $_POST["status"];


include "./config/connection.php";
if (!empty ($status))
{
	$perintah = "update pemesanan set status='$status' where id_pemesanan= '".$id_pemesanan."'";
$isi_data = mysql_query($perintah);
if(isset($isi_data))
	{
	echo"<script>alert('Data Berahsil Diubah ')</script>";
        echo"<script>history.go(-2);</script>";
	}
	else
	{
		header ("location:order.php?page=input&input=invalid");
	}
}
else
{
		header ("location:orders.php?page=input&input=invalid");
}
?>
    <? include "./include/menubawah.php"; ?>
    <?php
    ?>
  </body>
</html>
<?php
    }
else {
    include 'warning.php';
}
?>